<!DOCTYPE html>
<html>
<head>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="/X-admin/css/font.css">
    <link rel="stylesheet" href="/X-admin/css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="/X-admin/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/X-admin/js/xadmin.js"></script>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <script src="/static/js/echarts.min.js"></script>
</head>
<body>
    <div id="main" style="width: 1000px;height:500px;"></div>
    <div id="main1" style="width: 1000px;height:500px;"></div>
    <script>
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));
        var myChart1 = echarts.init(document.getElementById('main1'));
        // 指定图表的配置项和数据
        var option = {
            legend: {},
            tooltip: {},
            dataset: {
                source: [
                    {$time_s},
                    ['充值金额', {$arr2}],
                    ['消费金额', {$arr1}]
                ]
            },
            yAxis : [
                {
                    type : 'value',
                    splitArea : {show : true}
                }
            ],
            xAxis: [
                {type: 'category', gridIndex: 0},
            ],
            yAxis: [
                {gridIndex: 0},
            ],

            grid: [
                {bottom: '5%'},
            ],
            series: [
                // These series are in the first grid.
                {type: 'bar', seriesLayoutBy: 'row'},
                {type: 'bar', seriesLayoutBy: 'row'},
            ]
        };
        var option1 = {
            title: {
            },
            tooltip: {},
            legend: {
                data:['注册人数']
            },
            xAxis: {
                data: {$time},

            },
            yAxis: {},
            series: [{
                name: '注册人数',
                type: 'bar',
                data: [{$arr}],
                itemStyle:{
                    normal:{
                        color:'#4ad2ff'
                    }
                }
            }]
        };
        // 使用刚指定的配置项和数据显示图表。
        myChart1.setOption(option1);
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);

    </script>
</body>
</html>